<!DOCTYPE html>
<html>

<head>
<script>
function myFunction()
{
    console.log("hello world");
    document.getElementById("demo").innerHTML="My First JavaScript Function";
    alert("this is a place where can write code.");
}
</script>
</head>

<body>

<h1>My Web Page</h1>

<p id="demo">A Paragraph</p>

<button type="button" onclick="myFunction()">Try it</button>

</body>
</html>